"Education" = m_16,
"Healthcare" = m_17),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log',
facet=T, background = b,
draw = FALSE)
# Technology of the Rebellion
f2_data <- modelplot(list("Constitution" = m_a_1,
"Law" = m_a_2,
"Join IO" = m_a_4,
"Diplomatic mission" = m_a_4,
"Border patrol" = m_a_5,
"Justice" = m_a_6,
"Policing" = m_a_7,
"Elections" = m_a_8,
"Currency" = m_a_9,
"Parallel government" = m_a_10,
"Local government" = m_a_11,
"Government in exile" = m_a_12,
"Tax" = m_a_13,
"Economic treaty" = m_a_14,
"Negotiate resource rights" = m_a_15,
"Education" = m_a_16,
"Healthcare" = m_a_17),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log',
facet=T, background = b, draw = F)
theme_set(theme_minimal())
# plot
f1_orig <- ggplot(f1_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash",  alpha = 0.5) +
xlab("Estimate\nRelative Rebel Strength") +
ylab("")
# plot
f2_orig <- ggplot(f2_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash", alpha = 0.5) +
xlab("Estimate\nTechnology of Rebellion") +
ylab("") +
theme(axis.title.y = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank())
f1_orig
# Rebel strength
f1_data <-  modelplot(list("Constitution" = m_1,
"Law" = m_2,
"Join IO" = m_3,
"Diplomatic mission" = m_4,
"Border patrol" = m_5,
"Justice" = m_6,
"Policing" = m_7,
"Elections" = m_8,
"Currency" = m_9,
"Parallel government" = m_10,
"Local government" = m_11,
"Government in exile" = m_12,
"Tax" = m_13,
"Economic treaty" = m_14,
"Negotiate resource rights" = m_15,
"Education" = m_16,
"Healthcare" = m_17),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log|grptime2',
facet=T, background = b,
draw = FALSE)
# Technology of the Rebellion
f2_data <- modelplot(list("Constitution" = m_a_1,
"Law" = m_a_2,
"Join IO" = m_a_4,
"Diplomatic mission" = m_a_4,
"Border patrol" = m_a_5,
"Justice" = m_a_6,
"Policing" = m_a_7,
"Elections" = m_a_8,
"Currency" = m_a_9,
"Parallel government" = m_a_10,
"Local government" = m_a_11,
"Government in exile" = m_a_12,
"Tax" = m_a_13,
"Economic treaty" = m_a_14,
"Negotiate resource rights" = m_a_15,
"Education" = m_a_16,
"Healthcare" = m_a_17),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log|grptime2',
facet=T, background = b, draw = F)
theme_set(theme_minimal())
# plot
f1_orig <- ggplot(f1_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash",  alpha = 0.5) +
xlab("Estimate\nRelative Rebel Strength") +
ylab("")
# plot
f2_orig <- ggplot(f2_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash", alpha = 0.5) +
xlab("Estimate\nTechnology of Rebellion") +
ylab("") +
theme(axis.title.y = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank())
f1_orig
################################################################################
# Main Analysis: Regression Models Main Paper with Two-Way-Fixed Effects and Control Variables
################################################################################
# Fixed Effects - Year
# Rebel institutions and relative rebel strength
dv <- c("Constitution.count.1", "Law.count.1", "JoinIO.count.1", "DipMiss.count.1", "BorderP.count.1", "Justice.count.1",
"Police.count.1", "Elections.count.1", "Currency.count.1", "ParallelGov.count.1", "LocalGov.count.1",
"Gov_in_Exile.count.1", "Tax.count.1", "EconTreaty.count.1", "NegResource.count.1", "Edu.count.1", "Health.count.1")
for(i in 1:length(dv)){
model <- paste("m",i, "twfe", sep="_")
m <- feols(as.formula(paste(dv[i], "~ rebstrength.num + e_gdppc +
e_pop_log + e_total_resources_income_pc_log + v2exl_legitideol +
e_peinfmor | Location + year")), cluster = "Location",
data = qsi.vdem)
assign(model,m)}
# Rebel institutions and technology of rebellion
for(i in 1:length(dv)){
model <- paste("m_a",i, "twfe", sep="_")
m <- feols(as.formula(paste(dv[i], "~ technologyrebellion + e_gdppc +
e_pop_log + e_total_resources_income_pc_log + v2exl_legitideol +
e_peinfmor | Location + year")), cluster = "Location",
data = qsi.vdem)
assign(model,m)}
modelsummary::modelsummary(list(m_1_twfe, m_2_twfe, m_3_twfe, m_4_twfe, m_5_twfe, m_6_twfe, m_7_twfe, m_8_twfe, m_9_twfe, m_10_twfe,
m_11_twfe, m_12_twfe, m_13_twfe, m_14_twfe, m_15_twfe, m_16_twfe, m_17_twfe),
output = "tables/Study_1/Table_A1.docx",
estimate = "{estimate}{stars}",
statistic = 'std.error',
coef_rename = c("rebstrength.num" = "Rebel Strength",
"e_gdppc" = "GDP pc (log10)",
"e_pop_log" = "Pop (log10)",
"e_total_resources_income_pc_log" = "Ressource Income (log10)",
"v2exl_legitideol" = "Ideology",
"e_peinfmor" = "Infant Mortality"))
# Figures
# Create a background reference line for all figures
b <- list(geom_vline(xintercept = 0, color = 'red'))
# Visualizing effect sizes
# Rebel strength
f1_data <-  modelplot(list("Constitution" = m_1_twfe,
"Law" = m_2_twfe,
"Join IO" = m_3_twfe,
"Diplomatic mission" = m_4_twfe,
"Border patrol" = m_5_twfe,
"Justice" = m_6_twfe,
"Policing" = m_7_twfe,
"Elections" = m_8_twfe,
"Currency" = m_9_twfe,
"Parallel government" = m_10_twfe,
"Local government" = m_11_twfe,
"Government in exile" = m_12_twfe,
"Tax" = m_13_twfe,
"Economic treaty" = m_14_twfe,
"Negotiate resource rights" = m_15_twfe,
"Education" = m_16_twfe,
"Healthcare" = m_17_twfe),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log',
facet=T, background = b,
draw = FALSE)
# Technology of the Rebellion
f2_data <- modelplot(list("Constitution" = m_a_1_twfe,
"Law" = m_a_2_twfe,
"Join IO" = m_a_4_twfe,
"Diplomatic mission" = m_a_4_twfe,
"Border patrol" = m_a_5_twfe,
"Justice" = m_a_6_twfe,
"Policing" = m_a_7_twfe,
"Elections" = m_a_8_twfe,
"Currency" = m_a_9_twfe,
"Parallel government" = m_a_10_twfe,
"Local government" = m_a_11_twfe,
"Government in exile" = m_a_12_twfe,
"Tax" = m_a_13_twfe,
"Economic treaty" = m_a_14_twfe,
"Negotiate resource rights" = m_a_15_twfe,
"Education" = m_a_16_twfe,
"Healthcare" = m_a_17_twfe),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log',
facet=T, background = b, draw = F)
theme_set(theme_minimal())
# plot
f1 <- ggplot(f1_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash",  alpha = 0.5) +
xlab("Estimate\nRelative Rebel Strength") +
ylab("")
# plot
f2 <- ggplot(f2_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash", alpha = 0.5) +
xlab("Estimate\nTechnology of Rebellion") +
ylab("") +
theme(axis.title.y = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank())
# plot
f2 <- ggplot(f2_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash", alpha = 0.5) +
xlab("Estimate\nTechnology of Rebellion") +
ylab("") +
theme(axis.title.y = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank())
f2
f2_orig
(f1_orig + f2_orig)/ (f1 + f2)
# Rebel strength
f1_data_orig <-  modelplot(list("Constitution" = m_1,
"Law" = m_2,
"Join IO" = m_3,
"Diplomatic mission" = m_4,
"Border patrol" = m_5,
"Justice" = m_6,
"Policing" = m_7,
"Elections" = m_8,
"Currency" = m_9,
"Parallel government" = m_10,
"Local government" = m_11,
"Government in exile" = m_12,
"Tax" = m_13,
"Economic treaty" = m_14,
"Negotiate resource rights" = m_15,
"Education" = m_16,
"Healthcare" = m_17),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log|grptime2',
facet=T, background = b,
draw = FALSE)
# Technology of the Rebellion
f2_data_orig <- modelplot(list("Constitution" = m_a_1,
"Law" = m_a_2,
"Join IO" = m_a_4,
"Diplomatic mission" = m_a_4,
"Border patrol" = m_a_5,
"Justice" = m_a_6,
"Policing" = m_a_7,
"Elections" = m_a_8,
"Currency" = m_a_9,
"Parallel government" = m_a_10,
"Local government" = m_a_11,
"Government in exile" = m_a_12,
"Tax" = m_a_13,
"Economic treaty" = m_a_14,
"Negotiate resource rights" = m_a_15,
"Education" = m_a_16,
"Healthcare" = m_a_17),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log|grptime2',
facet=T, background = b, draw = F)
theme_set(theme_minimal())
# plot
f1_orig <- ggplot(f1_data_orig, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash",  alpha = 0.5) +
xlab("Estimate\nRelative Rebel Strength") +
ylab("") +
title("Original estimates")
f1_orig
# plot
f1_orig <- ggplot(f1_data_orig, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash",  alpha = 0.5) +
xlab("Estimate\nRelative Rebel Strength") +
ylab("") +
ggtitle("Original estimates")
f1_orig
# plot
f2_orig <- ggplot(f2_data_orig, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash", alpha = 0.5) +
xlab("Estimate\nTechnology of Rebellion") +
ylab("") +
theme(axis.title.y = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank())
################################################################################
# Main Analysis: Regression Models Main Paper with Two-Way-Fixed Effects and Control Variables
################################################################################
# Fixed Effects - Year
# Rebel institutions and relative rebel strength
dv <- c("Constitution.count.1", "Law.count.1", "JoinIO.count.1", "DipMiss.count.1", "BorderP.count.1", "Justice.count.1",
"Police.count.1", "Elections.count.1", "Currency.count.1", "ParallelGov.count.1", "LocalGov.count.1",
"Gov_in_Exile.count.1", "Tax.count.1", "EconTreaty.count.1", "NegResource.count.1", "Edu.count.1", "Health.count.1")
for(i in 1:length(dv)){
model <- paste("m",i, "twfe", sep="_")
m <- feols(as.formula(paste(dv[i], "~ rebstrength.num + e_gdppc +
e_pop_log + e_total_resources_income_pc_log + v2exl_legitideol +
e_peinfmor | Location + year")), cluster = "Location",
data = qsi.vdem)
assign(model,m)}
# Rebel institutions and technology of rebellion
for(i in 1:length(dv)){
model <- paste("m_a",i, "twfe", sep="_")
m <- feols(as.formula(paste(dv[i], "~ technologyrebellion + e_gdppc +
e_pop_log + e_total_resources_income_pc_log + v2exl_legitideol +
e_peinfmor | Location + year")), cluster = "Location",
data = qsi.vdem)
assign(model,m)}
modelsummary::modelsummary(list(m_1_twfe, m_2_twfe, m_3_twfe, m_4_twfe, m_5_twfe, m_6_twfe, m_7_twfe, m_8_twfe, m_9_twfe, m_10_twfe,
m_11_twfe, m_12_twfe, m_13_twfe, m_14_twfe, m_15_twfe, m_16_twfe, m_17_twfe),
output = "tables/Study_1/Table_A1.docx",
estimate = "{estimate}{stars}",
statistic = 'std.error',
coef_rename = c("rebstrength.num" = "Rebel Strength",
"e_gdppc" = "GDP pc (log10)",
"e_pop_log" = "Pop (log10)",
"e_total_resources_income_pc_log" = "Ressource Income (log10)",
"v2exl_legitideol" = "Ideology",
"e_peinfmor" = "Infant Mortality"))
# Figures
# Create a background reference line for all figures
b <- list(geom_vline(xintercept = 0, color = 'red'))
# Visualizing effect sizes
# Rebel strength
f1_data <-  modelplot(list("Constitution" = m_1_twfe,
"Law" = m_2_twfe,
"Join IO" = m_3_twfe,
"Diplomatic mission" = m_4_twfe,
"Border patrol" = m_5_twfe,
"Justice" = m_6_twfe,
"Policing" = m_7_twfe,
"Elections" = m_8_twfe,
"Currency" = m_9_twfe,
"Parallel government" = m_10_twfe,
"Local government" = m_11_twfe,
"Government in exile" = m_12_twfe,
"Tax" = m_13_twfe,
"Economic treaty" = m_14_twfe,
"Negotiate resource rights" = m_15_twfe,
"Education" = m_16_twfe,
"Healthcare" = m_17_twfe),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log',
facet=T, background = b,
draw = FALSE)
# Technology of the Rebellion
f2_data <- modelplot(list("Constitution" = m_a_1_twfe,
"Law" = m_a_2_twfe,
"Join IO" = m_a_4_twfe,
"Diplomatic mission" = m_a_4_twfe,
"Border patrol" = m_a_5_twfe,
"Justice" = m_a_6_twfe,
"Policing" = m_a_7_twfe,
"Elections" = m_a_8_twfe,
"Currency" = m_a_9_twfe,
"Parallel government" = m_a_10_twfe,
"Local government" = m_a_11_twfe,
"Government in exile" = m_a_12_twfe,
"Tax" = m_a_13_twfe,
"Economic treaty" = m_a_14_twfe,
"Negotiate resource rights" = m_a_15_twfe,
"Education" = m_a_16_twfe,
"Healthcare" = m_a_17_twfe),
coef_rename = c("technologyrebellionIrregular" = "Irregular",
"technologyrebellionSNC" = "SNC",
"grptime2" = "Group existance count",
"rebstrength.num" = "Relative rebel strength",
"e_peinfmor" = "Infant mortality",
"v2exl_legitideol" = "Ideology",
"e_total_resources_income_pc_log" = "Resource income",
"e_pop_log" = "Population",
"e_gdppc_log" = "GDP per capita"),
coef_omit = 'Intercept|e_peinfmor|v2exl_legitideol|
|e_total_resources_income_pc_log|e_gdppc|technologyrebellionSNC|
|e_pop_log',
facet=T, background = b, draw = F)
theme_set(theme_minimal())
# plot
f1 <- ggplot(f1_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash",  alpha = 0.5) +
xlab("Estimate\nRelative Rebel Strength") +
ylab("") +
ggtitle("Replication with TWFE and controls")
# plot
f2 <- ggplot(f2_data, aes(
y = model, x = estimate,
xmin = conf.low, xmax = conf.high)) +
ggdist::geom_pointinterval() +
geom_vline(xintercept = 0, color = 'red', linetype = "longdash", alpha = 0.5) +
xlab("Estimate\nTechnology of Rebellion") +
ylab("") +
theme(axis.title.y = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank())
f1
(f1_orig + f2_orig)/ (f1 + f2)
ggsave("figures/Study_1/Figure_1_Main_paper.png", width = 15, height = 20, units = "cm", dpi = 600)
ggsave("figures/Study_1/Figure_1_Main_paper.png", width = 17, height = 20, units = "cm", dpi = 600)
(f1_orig + f2_orig)/ (f1 + f2) +  plot_annotation(tag_levels = 'A')
(f1_orig + f2_orig)/ (f1 + f2) +  plot_annotation(tag_levels = '(A)')
(f1_orig + f2_orig)/ (f1 + f2) +  plot_annotation(tag_levels = 'A')
ggsave("figures/Study_1/Figure_1_Main_paper.png", width = 17, height = 20, units = "cm", dpi = 600)
